	<template>
    <div class="questionnaire zanwei-top">
      <head-nav></head-nav>
        <div class="allTk" @click="goDetail(item.ID)" v-for="(item,index) in tklist" :key="index">
            <div class="oneTm" style="overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;">
                {{item.WJBT}}
            </div>
            <div class="btn">参与问答</div>
        </div>
        <!-- <div class="test" style="bottom: 1rem;" @click="carm">测试按钮1</div>
		<div class="test" @click="test">测试按钮2</div>
		<div class="test" style="bottom: 2rem;" @click="test2">测试按钮3</div> -->
        <!-- <div class='hasPh' v-for="(item,index) in tempFilePaths" :key="index">
			<img :src="item" class="image" style='width: 2rem;height: 2rem;' />
		</div> -->
    <div style="text-align: center;font-size:25px">正在开发中，敬请期待!</div>
		<Gmask :mshow="mshow"></Gmask>
    </div>
</template>

<script>
import apiQues from "@/api/question";
import api from "@/api/api";
import { MessageBox, Toast } from "mint-ui";
import Gmask from '@/components/common/Gmask';
export default {
	components:{
		Gmask
	},
  data() {
    return {
      row: 10,
      num: 1,
      tklist: [],
      arr: [
        {
          TKNAME: "关于粉丝节活动内容的意见反馈"
        },
        {
          TKNAME: "七夕节想收到哪些礼物"
        }
      ],
      tempFilePaths: [],
      mshow: false
    };
  },
  methods: {
    goDetail(id) {
      // this.$router.push({ path: "/topic", query: { id: id } }); // 详情
      this.$router.push('/topic/'+id); // 详情
    }
  },
  created() {
    let that = this;
    let row = this.row;
    let num = this.num;
    var userinfo = JSON.parse(sessionStorage.getItem("userinfo"));
    var userid = userinfo.vipcode;
    this.userid = userid;
    if (userinfo == null || userinfo.vipcode === "") {// 未登录
    	that.mshow = true;
    	return false;
    }
    that.mshow = false;
    apiQues.getWjdcList(this, row, num, function(res) {
      console.log("问卷调查列表");
      let data = res.data;
      console.log(data);
      if (data.code == 0) {
        data = JSON.parse(data.data);
        console.log(data);
        that.tklist = data.rows;
      } else {
        Toast({
          message: data.msg,
          duration: 1500
        });
      }
    });
    
  }
};
</script>

<style lang="less">
.questionnaire {
  .allTk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.01rem solid #ccc;
    height: 1.8rem;
    .oneTm {
      padding: 0.1rem 0.2rem;
      line-height: 0.5rem;
      font-size: 0.32rem;
      margin: 0.1rem;
      flex: auto;
      width: 70%;
    }
    .btn {
      border-radius: 0.1rem;
      line-height: 0.6rem;
      text-align: center;
      padding: 0 0.2rem;
      color: #ffffff;
      background-color: #F05DC4;
      margin-right: 0.1rem;
      font-size: 0.3rem;
      width: 1.3rem;
    }
  }
  .test {
    padding: 0.1rem 0.2rem;
    background-color: #cccc77;
    position: fixed;
    bottom: 0.3rem;
    left: 0.3rem;
    
  }
}
</style>